#ifndef __ADFADSRFAEFADFEFAEF__
#define __ADFADSRFAEFADFEFAEF__
#ifdef __cplusplus
extern "C" {
#endif

#include <sys/types.h>
#include <sys/time.h>
#include <pthread.h>
#include <errno.h>
#include <stdlib.h>

#define INFINITE    0xFFFFFFFF // Infinite timeout

typedef void* (*vz_thread_func)(void*);

long threadx_create(vz_thread_func pfunc, void* param, long* out_hThread);
long threadx_cancel(long hThread, bool bForce);

long mutexx_init(long* out_hMutex);
long mutexx_unit(long hMutex);
long mutexx_lock(long hMutex);
long mutexx_unlock(long hMutex);

long eventx_init(long* out_hEvent);
long eventx_unit(long hEvent);
long eventx_post(long hEvent);
long eventx_wait(long hEvent, unsigned int dwMilliseconds);

#ifdef __cplusplus
}
#endif
#endif
